package com.k8.common.factroy.instance;

import com.k8.common.ioc.BeanPostProcessor;
import com.k8.common.ioc.Injector;
import com.k8.common.factroy.BeanInfo;

import java.util.List;

public interface
InstanceStrategyFactory {
    void registryBean(Object instance);

    void registryBean(Object instance, String name);

    <T> T getBean(Class<T> clazz);

    <E> E createProtoBean(Class<E> clazz);

    <T> T getBean(Class<T> clazz, String name);

    <T> T getOrRegistryBean(Class<T> clazz);

    <T> T getOrRegistryBean(Class<T> clazz, String name);

    <T> T getBeanOrRegistryToInject(Class<T> clazz);

    <T> T getBeanOrRegistryToInject(Class<T> clazz, String name);

    void setInjector(Injector injector);

    void setBeanPostProcessors(List<BeanPostProcessor> beanPostProcessors);

    BeanInfo getBeanInfo(String relyBeanName);

    <T> List<T> getAllBeans(Class<T> tClass);
}
